package com.wxzz.elearing.comment.api.admin;

import com.alibaba.fastjson.JSONObject;
import com.wxzz.elearing.comment.dto.CommunityQuestionsAnswersDto;
import com.wxzz.elearing.comment.dto.StudyAnswersDescDto;
import com.wxzz.elearing.comment.dto.StudyAnswersDto;
import com.wxzz.elearing.comment.entity.Comment;
import com.wxzz.elearing.comment.entity.QuestionsAnswersList;
import com.wxzz.elearing.comment.entity.StudyComment;
import com.wxzz.elearing.comment.entity.StudyQuestionsAnswersList;
import com.wxzz.elearing.comment.service.IStudyCommentService;
import com.wxzz.elearing.comment.vo.StudyAnswersVo;
import com.wxzz.elearing.comment.vo.StudyQuestionsContentDescVo;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/admin-study-comment")
@Api(tags = "学以致用评论接口(企业)")
public class AdminStudyCommentController {

    @Resource
    private IStudyCommentService iStudyCommentService;

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @ApiOperation(value = "企业学以致用评论删除(企业)", notes = "企业问答评论删除(企业)", httpMethod = "POST", tags = "企业")
    @RequestMapping(value = "deleteComment", method = RequestMethod.POST)
    public ReturnVO deleteComment(@RequestBody StudyComment comment) {
        return iStudyCommentService.deleteComment(comment);
    }

    @ApiOperation(value = "企业学以致用文章删除(企业)", notes = "企业问答文章删除(企业)", httpMethod = "POST", tags = "企业")
    @RequestMapping(value = "deleteQueAns", method = RequestMethod.POST)
    public ReturnVO deleteQueAns(@RequestBody StudyQuestionsAnswersList questionsAnswersList) {
        return iStudyCommentService.deleteQueAns(questionsAnswersList);
    }
}
